import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/home/Home'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: "/detail/:id",
      name: "detail",
      component: () => import('@/views/detail/detail.vue')
    },
    {
      path: "/city",
      name: "city",
      component: () => import('@/views/city/City.vue')
    }
  ],
  scrollBehavior() {
    return {
      x: 0, y: 0
    }
  }
})
